* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', sans-serif;
    background-color: #f3f5f7;
    overflow-y: auto; /* 允许垂直滚动 */
}

.wrapper {
    width: 1200px;
    margin: 0 auto;
}

/* 头部背景图容器 */
.header-bg {
    position: relative;
    height: 100px;
    background-image: url(../images/首页栏1.png);
    background-size: cover;
    background-position: left;
    display: flex;
    align-items: center;
}

/* 内容层 */
.header-content {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 0 40px;
    display: flex;
    align-items: center;
}

/* 搜索栏容器 */
.search-container {
    flex: 1;
    margin: 0 40px;
    position: relative;
}

/* 搜索栏 - 左侧对齐黄金分割线 */
.search-box {
    position: absolute;
    width: 25%; /* 占页面宽度的1/4 */
    left: 70%; /* 搜索栏左侧对齐黄金分割线 */
    top: 50%; /* 垂直居中 */
    transform: translateY(-50%); /* 只垂直偏移，保持水平位置不变 */
    padding: 12px 20px;
    border: none;
    border-radius: 25px;
    font-size: 1em;
    background: rgba(255, 255, 255, 0.9);
    z-index: 2;
}

.search-box:focus {
    outline: none;
    background: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* 右侧时间显示 */
.time-display {
    color: white;
    margin-right: 65px;
    text-align: right;
    min-width: 300px;
}

.date-line {
    font-size: 20px;
    margin-bottom: 6px;
    font-weight: 550;
}

.lunar-date {
    font-size: 16px;
    font-weight: 400;
}

/* 透明覆盖层 */
.floating-box {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(238, 204, 175, 0.6); /* 40% 透明度 */
    z-index: 1;
}

/* 主要内容区域 */
.main-content {
    position: relative;
    padding-top: 45px; /* 为悬浮导航留出空间 */
}

/* 悬浮矩形框 - 固定在头部背景图容器后面 */
.floating-box-nav {
    position: absolute;
    top: 100px; /* 与头部背景图容器对齐 */
    left: 0;
    width: 100%;
    height: 45px;
    background-color: rgba(222, 186, 153, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 80px;
    z-index: 10;
}

/* 导航项目样式 */
.nav-item {
    color: white;
    font-size: 1.2em;
    font-weight: bold;
    text-decoration: none;
    padding: 5px 10px;
    transition: color 0.3s ease;
}

/* 鼠标悬浮效果 */
.nav-item:hover {
    color: #6D281D !important;
}

/* 非遗分类区域 */
.category {
    padding: 40px 0;
    background-color: white;
}

.category .wrapper {
    display: flex;
    flex-direction: column;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.category-row {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
}

.category-row:last-child {
    margin-bottom: 0;
}

.category-item {
    text-align: center;
    padding: 25px 15px;
    border: 1px solid #eee;
    border-radius: 8px;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
    background-color: #fff;
    cursor: pointer;
    flex: 1;
    margin: 0 10px;
}

.category-item:first-child {
    margin-left: 0;
}

.category-item:last-child {
    margin-right: 0;
}

.category-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    border-color: #EECCAF;
}

.category-item-icon {
    width: 60px;
    height: 60px;
    background-color: #EECCAF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 24px;
    color: white;
}

.category-item h3 {
    color: #333;
    margin-bottom: 8px;
    font-size: 16px;
}

.category-item p {
    color: #666;
    font-size: 12px;
}

/* 精品非遗项目 */
.featured {
    padding: 40px 0;
    background-color: #f9f9f9;
}

.featured .hd {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.featured .hd h3 {
    font-size: 24px;
    color: #6D281D;
}

.featured .more {
    padding-right: 20px;
    background: url(../images/jianotu999.png) no-repeat right center;
    background-size: 6px; 
    font-size: 14px;
    color: #999;
    text-decoration: none; /* 去掉下划线 */
}

.featured .bd ul {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    list-style: none;
}

.featured .bd li {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

/* 去除精品推荐区域所有链接的下划线 */
.featured .bd a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.featured .bd li:hover {
    transform: translateY(-5px);
}

.featured .bd .pic {
    height: 180px;
    overflow: hidden;
}

.featured .bd .pic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.featured .bd li:hover .pic img {
    transform: scale(1.1);
}

.featured .bd .text {
    padding: 15px;
}

.featured .bd .text h4 {
    color: #333;
    margin-bottom: 8px;
    font-size: 16px;
    text-decoration: none;
    
}

.featured .bd .text p {
    color: #999;
    font-size: 14px;
    text-decoration: none;
}

.featured .bd .text p span {
    color: #6D281D;
    margin-right: 8px;
    text-decoration: none;
}

/* 非遗地图 */
.map {
    padding: 40px 0;
    background: linear-gradient(135deg, #DE9960 0%, #DEBA99 100%);
    color: white;
}

.map .hd {
    text-align: center;
    margin-bottom: 30px;
}

.map .hd h3 {
    font-size: 28px;
    margin-bottom: 10px;
}

.map .hd p {
    font-size: 16px;
    opacity: 0.9;
}

.map .bd {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.map-row {
    display: flex;
    justify-content: space-around;
}

.map-item {
    background: rgba(255, 255, 255, 0.2);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    backdrop-filter: blur(10px);
    flex: 1;
    margin: 0 10px;
    min-width: 0; /* 防止flex item溢出 */
}

.map-item:first-child {
    margin-left: 0;
}

.map-item:last-child {
    margin-right: 0;
}

.map-item h4 {
    font-size: 18px;
    margin-bottom: 10px;
}

.map-item p {
    font-size: 14px;
    opacity: 0.8;
}

/* 页脚 */
.footer {
    background-color: #333;
    color: white;
    padding: 30px 0;
    text-align: center;
}